package com.qf.edu.service.impl;

import com.qf.edu.dao.ImgPath;
import com.qf.edu.dao.impl.ImgPathImpl;
import com.qf.edu.entity.Imgpath;
import com.qf.edu.service.ImgPathService;

/**
 * @author:huayuzhuo
 * @email:2798866329@qq.com
 * @desc:ImgPathService接口的实现类
 * @datatime: 2022/6/7 10:55
 */
public class ImgPathServiceImpl implements ImgPathService {
    ImgPath imgPath = new ImgPathImpl();
    @Override
    public String imgSer(String path,String name) {
        int setimgpath = imgPath.setimgpath(path,name);
        if (setimgpath == 0){
            return "修改相对路径失败";
        } else {
            return "修改相对路径通过";
        }
    }

    @Override
    public String getPath(String name) {
        Imgpath getpath = imgPath.getpath(name);
        if (getpath != null){
            return getpath.getPath();
        }
        return null;
    }
}
